﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ApplicationApprove.aspx.cs" Inherits="CentralOffice.WebClient.Tasks.ApplicationApprove" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>我要审批</title>
    <link rel="stylesheet" type="text/css" href="../theme/2/style.css" />
    <script src="../inc/js/ccorrect_btn.js" type="text/javascript"></script>
</head>
<body>
<body class="bodycolor" topmargin="5">
<div style="margin-top:20px; margin-left:8px;"><h3>需要我审批的申请</h3></div>

    <form id="form1" runat="server">
    <ajaxToolkit:ToolkitScriptManager runat="server" ID="sm"  />
    
    

<huag:OAGridView id="gvApproval" runat="server" DataKeyNames="Id" AllowSorting="True" 
        skinid="DefaultGridView" Width="98%"  DataSourceID="odsApproval" OnRowDataBound="gvApproval_RowDataBound"
        EnableViewState="False">
   <Columns>
       <asp:HyperLinkField DataTextField="Name" DataNavigateUrlFormatString="ApplicationView.aspx?id={0}" DataNavigateUrlFields="ApplicationId" HeaderText="申请名称" target="_blank" SortExpression="Name" />
       <asp:BoundField DataField="ApplicationCode" HeaderText="编号" />
       <asp:BoundField DataField="Applicant" HeaderText="申请人" SortExpression="Applicant" />
       <asp:BoundField DataField="DateOfApplication" HeaderText="申请日期" DataFormatString="{0:yyyy-MM-dd HH:mm:ss}" HtmlEncode="false" SortExpression="DateOfApplication" />
       <huag:EnumTypeField DataField="UrgencyDegree" HeaderText="紧急程度" CategoryName="applicationPriority"  SortExpression="UrgencyDegree" />
       <asp:BoundField DataField="ContentText" HeaderText="本步审批内容" />
       <asp:BoundField DataField="PreviousApprovedBy" HeaderText="上步审批者"  />
       <%--<asp:BoundField DataField="PreviousContentText" HeaderText="上步审批内容" />--%>
       <asp:BoundField DataField="PreviousDateApproved" HeaderText="上步审批日期" DataFormatString="{0:yyyy-MM-dd HH:mm:ss}" HtmlEncode="false" />
       <asp:BoundField DataField="PreviousResultApproved" HeaderText="上步审批结果" />
       <asp:BoundField DataField="ElapsedTime" HeaderText="审批时长" />
       
       <asp:HyperLinkField  Text="审批" DataNavigateUrlFormatString="Approval.aspx?id={0}" DataNavigateUrlFields="Id" Target="_blank" />
       
   </Columns>
</huag:OAGridView>
    

<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
  <tr>
    <td class="Big"><img src="../images/sys_config.gif" WIDTH="22" HEIGHT="20" align="absmiddle" /><span class="big3">我已审批的申请</span></td>
  </tr>
</table>
    <asp:UpdatePanel UpdateMode="Conditional" ID="upCompany" runat="server" ChildrenAsTriggers="true">
<ContentTemplate>
    
<huag:OAGridView  id="gv" runat="server" DataKeyNames="Id" AllowSorting="True" skinid="PagingGridView" Width="98%" ConfirmDelete="true"  DataSourceID="odsApproved" OnRowDataBound="gv_RowDataBound" EnableViewState="false" >
   <Columns>
       <%--<asp:BoundField DataField="Name" HeaderText="名称" SortExpression="Name"  />--%>
       <asp:HyperLinkField DataTextField="Name" DataNavigateUrlFormatString="ApplicationView.aspx?id={0}" DataNavigateUrlFields="ApplicationId" HeaderText="名称" target="_blank" SortExpression="Name"/>
       <asp:BoundField DataField="ApplicationCode" HeaderText="编号" />
       <asp:BoundField DataField="Applicant" HeaderText="申请人" SortExpression="Applicant" />
       <asp:BoundField DataField="DateOfApplication" HeaderText="申请日期" DataFormatString="{0:yyyy-MM-dd HH:mm:ss}" HtmlEncode="false" SortExpression="DateOfApplication" />
       <asp:BoundField DataField="DateApproved" HeaderText="本步审批日期" DataFormatString="{0:yyyy-MM-dd}" HtmlEncode="false" />
       <asp:BoundField DataField="ResultApproved" HeaderText="本步审批结果"  />
       <asp:BoundField DataField="PreviousApprovedBy" HeaderText="上步审批者"  />
       <%--<asp:BoundField DataField="PreviousContentText" HeaderText="上步审批内容" />--%>
       <asp:BoundField DataField="PreviousResultApproved" HeaderText="上步审批结果" />
       <asp:BoundField DataField="ElapsedTime" HeaderText="审批时长" />
       <asp:HyperLinkField  Text="修改审批" DataNavigateUrlFormatString="Approval.aspx?id={0}&op=u" DataNavigateUrlFields="Id" Target="_blank" />
   </Columns>
</huag:OAGridView>

</ContentTemplate>
<Triggers>
<%--<asp:AsyncPostBackTrigger ControlID="btnQuery" />--%>
</Triggers>
</asp:UpdatePanel>
    


<asp:ObjectDataSource id="odsApproval" runat="server"
 TypeName="CentralOffice.Task.BusinessActions.Approvals" 
 SelectMethod="Find" OnSelecting="odsApproval_Selecting">
    <SelectParameters>      
      <asp:Parameter Name="whereClause" Type="String" />
      <asp:Parameter Name="orderByExpression" Type="String" DefaultValue="CreatedTime" />
      <asp:Parameter Name="hideDeleted" Type="Boolean" DefaultValue="True" />
      <asp:Parameter Name="isStoredProc" Type="Boolean" DefaultValue="True" />
      <asp:Parameter Name="enableCache" Type="Boolean" DefaultValue="False" />
      
    </SelectParameters>
</asp:ObjectDataSource>

<asp:ObjectDataSource id="odsApproved" runat="server" EnablePaging="True" 
 TypeName="CentralOffice.Task.BusinessActions.Approvals" 
 SelectMethod="GetPaged" SelectCountMethod="GetCount"
 SortParameterName="sortExpression"  OnSelecting="odsApproved_Selecting">
    <SelectParameters>      
      <asp:Parameter Name="whereClause" Type="String" />
      <%--<asp:Parameter Name="hideDeleted" Type="Boolean" DefaultValue="True" />
      <asp:Parameter Name="isStoredProc" Type="Boolean" DefaultValue="True" />--%>
    </SelectParameters>
</asp:ObjectDataSource>
    </form>
</body>
</html>
